package com.zretc.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 实体类 ，员工
 * @Component 写在类前，表示的是一个组件,一个bean
 * @author admin
 *
 */
@Component(value = "emp")
public class Employee {

	
	private int empid;
	@Value("小白")
	private String empname;
	

	@Override
	public String toString() {
		return "Employee [empid=" + empid + ", empname=" + empname + "]";
	}

	/**
	 * @return the empid
	 */
	public int getEmpid() {
		return empid;
	}

	/**
	 * @param empid the empid to set
	 */
	@Value("1")
	public void setEmpid(int empid) {
		//System.out.println("setEmpid.......");
		this.empid = empid;
	}

	/**
	 * @return the empname
	 */
	public String getEmpname() {
		return empname;
	}

	/**
	 * @param empname the empname to set
	 */
	public void setEmpname(String empname) {
		this.empname = empname;
	}

}
